package com.song.mscloud.controller;

import com.song.mscloud.api.RoomFeign;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TonySong
 * @date 2024/5/7 0007
 * @time 15:58
 */
@RestController
@Slf4j
public class StudnetController {

    @Resource
    private RoomFeign roomFeign;

    @GetMapping("/student")
    public String student() {
        return "学生列表";
    }

    @GetMapping("/student/rooms")
    public String roomList(){
        log.info("student get room list");
        return this.roomFeign.getRooms();
    }
}
